home *** CD-ROM | disk | FTP | other *** search
/ Chip 1996 December / CHIP Aralık 1996.iso / prog / backpack / demodata / misc / start.dxr / 00065_MakeLists for loaded games old one!!!.ls < prev    next >
Encoding:
Text File  |  1995-08-30  |  908 b   |  40 lines

  1. on MakeListsOld
  2.   global ACTION, TWNS, JOBS, LQDS
  3.   set TWNS to list()
  4.   set LQDS to list()
  5.   set JOBS to list()
  6.   repeat with K = 1 to count(ACTION)
  7.     set P to getAt(ACTION, K)
  8.     if (P > 1) and (P < 51) then
  9.       append(TWNS, P)
  10.       next repeat
  11.     end if
  12.     if (P mod 10) <= -5 then
  13.       set HIT to 0
  14.       repeat with L = 1 to count(JOBS)
  15.         if getAt(ACTION, K - 2) = getAt(JOBS, L) then
  16.           set HIT to 1
  17.         end if
  18.       end repeat
  19.       if HIT = 0 then
  20.         append(JOBS, getAt(ACTION, K - 2))
  21.       end if
  22.     end if
  23.   end repeat
  24.   set LP to 0
  25.   set K to count(ACTION)
  26.   repeat while (K > 0) and (LP < 8)
  27.     set P to getAt(ACTION, K)
  28.     if (P > 0) and (P < 150) then
  29.       set LP to LP + 1
  30.       append(LQDS, P)
  31.     end if
  32.     set K to K - 1
  33.   end repeat
  34.   if count(LQDS) < 8 then
  35.     repeat with n = count(LQDS) + 1 to 8
  36.       setAt(LQDS, n, 0)
  37.     end repeat
  38.   end if
  39. end
  40.